package com.hsy.crm.web.web.finance;

import com.hsy.crm.web.domain.cm.Response;
import com.hsy.crm.web.domain.entity.FinTransOrder;
import com.hsy.crm.web.domain.vo.fintrans.FinTransInsertVo;
import com.hsy.crm.web.domain.vo.fintrans.FinTransPageVo;
import com.hsy.crm.web.service.impl.FinTranService;
import com.hsy.crm.web.web.BaseAction;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/finTransOrder")
public class FinTransOrderAction extends BaseAction {
    @Autowired
    FinTranService finTranService;

    @RequestMapping("/insert")
    public String insert(FinTransInsertVo vo) {
        return Response.body(finTranService.insertFinTransOrder(vo));
    }

    @RequestMapping("/update")
    public String update(FinTransInsertVo vo) {
        return Response.body(finTranService.updateFinTransOrder(vo));
    }

    @RequestMapping("/delete")
    public String delete(FinTransOrder finTransOrder) {
        return Response.body(finTranService.deleteFinTransOrder(finTransOrder));
    }

    @RequestMapping("/getOrder")
    public String getOrder(FinTransOrder finTransOrder) {
        return Response.body(finTranService.getOrder(finTransOrder));
    }

    @RequestMapping("/page")
    public String page(FinTransPageVo finTransPageVo) {
        return Response.body(finTranService.page(finTransPageVo));
    }

    @RequestMapping("/examine")
    public String examine(FinTransOrder finTransOrder) {
        return Response.body(finTranService.examine(finTransOrder));
    }

    @RequestMapping("/invalid")
    public String doInvalid(FinTransOrder finTransOrder) {
        return Response.body(finTranService.doInvalid(finTransOrder));
    }
}
